Qhimm.com
Hey, kruci, you have 14 messages, 0 are new.
Total time logged in: 2 days, 5 hours and 26 minutes.
Show unread posts since last visit.
Show new replies to your posts.
2007-12-17 19:05:09
Search:     Advanced search
New forums! Please see this topic for more information.
66300 Posts in 5585 Topics by 3263 Members
Latest Member: YuffiexKisaragi
* Home Help Search Profile Logout
Qhimm.com  |  Public forums  |  Tech-related (Moderator: halkun)  |  Topic: ff9.img directories and files « previous next »
Pages: 1 [2] Reply Notify of replies Mark unread Send this topic Print
Author Topic: ff9.img directories and files  (Read 958 times)
halkun
Moderator
*
Posts: 1434


halkun2002@msn.com halkun2002
View Profile WWW Email Personal Message (Offline)
« Reply #25 on: 2006-06-05 23:03:14 »
Reply with quote

You know, you should really start nameing these directories. It will make things a little more standard and easier to read.

I mean it can't be any different than FF7's

INIT
ENEMY
WM
MINI

Report to moderator   Logged
Cyberman
No life
*
Posts: 1261


cyberman_phillips
View Profile WWW Personal Message (Offline)
« Reply #26 on: 2006-06-06 06:16:17 »
Reply with quote

You know, you should really start nameing these directories. It will make things a little more standard and easier to read.

I mean it can't be any different than FF7's

INIT
ENEMY
WM
MINI
It's a thought save for the fact the directories are offsets from a table.. and the files are offsets from a table. So there are no names readily available.  Also the index value cannot be directly associated to a name unless one memorizes what the index value of a name is.  My memory is crap of late, so I know I would constantly have to use a little sheet irreguardless of the names.
When we finish hashing out the information contained in each directory I suppose it would be more functional to do it that way. As yet we are acertaining what files are where and such.  It would be nice if the scripting were the similar to FF7 and FF8's format.

Cyb
Report to moderator   Logged
Tonberry
Cool Newbie
*
Posts: 38


View Profile Personal Message (Offline)
« Reply #27 on: 2006-06-07 03:01:07 »
Reply with quote

I agree with both of you. Smiley

Naming dirs and files can help people understand where things are located and such, but as Cyberman pointed out it is too early to do that. I'd suggest to simply create tables mapping the numbers to a short description so people interested can use them and don't get lost. But I'll keep on using numbers until things are a little more clear. (Anyway I wouldn't mind explaining something without the numbers if necessary.)

I think the table Zande provided for the directories is a good start. Now that I can read some of the encoded text, I'm doing a similar table for files in DIR00 in my free time (not much).


For those interested in reading the encoded text I found, I'll post this table:

Code:
    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
 +---------------------------------------------------
0|  0  1  2  3  4  5  6  7  8  9  +  -  =  *  % SPC
1|  A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P
2|  Q  R  S  T  U  V  W  X  Y  Z  (  !  ?  "  :  .
3|  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  p
4|  q  r  s  t  u  v  w  x  y  z  )  ,  /  º  ~  &
5| 
6|              á                       í
7|  ó           ú
8|
9|
A|
B|     ¿
C|
D|
E|
F|                       \n

SPC=SPACE (0x20)
\n=New line

It's not complete, as I've added only the bytes I verified, but it should be enough to read some text; especially the dialog, some debug messages, and the text from the menus.

The row number is the most significant nibble in a byte and the column number is the less significant nibble. You'll have to convert that byte to the character inside the cell in those coordinates.

It's not too difficult to get the position for other characters as they can be found in some of the TIM images of fonts.
I already know how to get the image for each individual character from the font image, but I haven't looked too much into it so I'll leave that for when I have more time.

If anyone feels like completing the table I won't mind. Cheesy

A note: there are probably similar tables for other fonts.


Besides that, I have a description of what I know is inside of F<00>013. It's interesting as I was able to recognize most elements from the first half of the file, but I think I won't be able to know what's inside the other half just by looking at it.

File F<00>013 seems to be the "load/save game" menu. Just to give some bad news to Cyberman Grin, I wasn't able to find a header nicelly describing the components, plus I think it's the same thing for all DIR00 files. My only hope is that those elements are pointed to from a script.

I won't give the offsets of my version, as they'll surelly be different for the English version; or any other language for that matter.

Code:
(4 bytes) File identifier? (=0x00000014)
(4 bytes) Unknown (=0x00003030)
(8 bytes) String "/DISCO" padded with 0x00. (Translation: "DISK")
(4 bytes) Unknown (0x00)
(2 bytes) Unknown (0x7e)
(2 bytes) Unknown (0xe0)
(4 bytes) Number of pointers to strings that follow. (=0x3a)
Pointer to string:
  (2 bytes) Number of bytes (relative to offset of first pointer) till the first char of the string.
  (2 bytes) Unknown. (Attributes of string?)
... (Repeat for every pointer.)
Encoded string. (Variable length.)
... (Repeat for every string.)
(256 bytes)  CLUT for Zidane. (entries=128, 16bpp, size=256 bytes)
(1472 bytes) Picture of Zidane's face. (width=32, height=46, size=1472 bytes)
(256 bytes)  CLUT for Vivi. (entries=128, 16bpp, size=256 bytes)
(1472 bytes) Picture of Vivi's face. (width=32, height=46, size=1472 bytes)
(256 bytes)  CLUT for Garnet. (entries=128, 16bpp, size=256 bytes)
(1472 bytes) Picture of Garnet's face. (width=32, height=46, size=1472 bytes)
(256 bytes)  CLUT for ***. (entries=128, 16bpp, size=256 bytes)
(1472 bytes) Picture of ***'s face. (width=32, height=46, size=1472 bytes)
(256 bytes)  CLUT for Steiner. (entries=128, 16bpp, size=256 bytes)
(1472 bytes) Picture of Steiner's face. (width=32, height=46, size=1472 bytes)
(256 bytes)  CLUT for Quina. (entires=128, 16bpp, size=256 bytes)
(1472 bytes) Picture of Quina's face. (width=32, height=46, size=1472 bytes)
(256 bytes)  CLUT for Eiko. (entries=128, 16bpp, size=256 bytes)
(1472 bytes) Picture of Eiko's face. (width=32, height=46, size=1472 bytes)
(256 bytes)  CLUT for Freya. (entries=128, 16bpp, size=256 bytes)
(1472 bytes) Picture of Freya's face. (width=32, heigth=46, size=1472 bytes)
(256 bytes)  CLUT for Amarant. (entires=128, 16bpp, size=256 bytes)
(1472 bytes) Picture of Amarant's face. (width=32, height=46, size=1472 bytes)
(256 bytes)  CLUT for Marcus. (entires=128, 16bpp, size=256 bytes)
(1472 bytes) Picture of Marcus' face. (entries=128, 16bpp, size=1472 bytes)
(512 bytes)  CLUT for "passing pages of a book". (entries=256, 16bpp, size=512 bytes)
(5808 bytes) Picture of "passign pages of a book". (width=176, height=33, size=5808 bytes)
... (Rest is unknown at the moment and is barelly half the file.)

The *** above means I don't remember the name of the protagonist, but if I'm not wrong it's Dagger. I really don't remember if Garnet changed names and the picture of her face changed in the menus as well.

The "passing pages of a book" is, as I mentioned before, the animation of the book that appears when the game is opening a memory card.

After that image I don't know what's in there. That may be a good place to look for some script or compiled code but I don't know machine code nor assembly for the psx and neither do I know ff7 nor ff8 scripting language. So, if anyone could look a little bit into it, please... Smiley

It's quite homogeneous and if it was a 8086 architecture I'd go for code, but I might as well be completelly wrong.
Report to moderator   Logged
Cyberman
No life
*
Posts: 1261


cyberman_phillips
View Profile WWW Personal Message (Offline)
« Reply #28 on: 2006-06-07 20:01:30 »
Reply with quote

It's not bad news that's good news. I suspected DIR00 of being odd.  I believe this to be splash screens and menu things for the game now. (MENU? Cheesy)
In summary things are potentially better because of this.
Hmmm I believe there is a font that looks similiar to your matrix coding for text.. I'll have to nose around for it.

The game has a script somewhere, but where is the question, finding the script data is likely going to be troublesome I suspect.

It may be in DIR02 but not with the text... only time will tell.

Erstwhile I am looking at cooling my hard disk and trying to get the data off of it (or at least Hoping too).

Cyb
Report to moderator   Logged
Tonberry
Cool Newbie
*
Posts: 38


View Profile Personal Message (Offline)
« Reply #29 on: 2006-06-08 00:14:38 »
Reply with quote

Quote
It's not bad news that's good news. I suspected DIR00 of being odd.  I believe this to be splash screens and menu things for the game now. (MENU?)

I was just kidding about the bad news, but I'd prefer headers in the files. I agree with the MENU designation but there can be some exception to it.

Quote
It may be in DIR02 but not with the text... only time will tell.

All the files in DIR02 have this structure:

Code:
(4 bytes) DB structure with one sub-element. (Always DB 01 00 00)
(3 bytes) Pointer to first (and only) sub-element in DB struct. (Always 0x04)
(1 byte)  Type of sub-element. (Always 0x06. Text array?)
First sub-element:
  (4 bytes) Unknown. (Always 06 01 00 00)
  (4 bytes) Unknown. It's incremented by 1 or more units with each file.
  (4 bytes) Unknown. (Always 08 00 00 00)
  (4 bytes) Pointer to first byte after last string. (Pointer to slack space.)
  (4 bytes) Number of string pointers.
  Pointer to first string:
    (2 bytes) Number of bytes (relative to offset of first pointer) till the first char of the string.
    (2 bytes) Unknown. (Attributes of string?)
  ... (Repeat for every pointer.)
  First encoded string. (Variable length, ends in 0xFF.)
  ... (Repeat for every string.)
(0x00 padded to complete last sector.)

As you can see they are quite simple. Every file is "text oriented" (meaning they define arrays of strings and not much more.) As I said before, the only relation to a script can be defined in the attributes or by some special character inside the strings, but there aren't many examples where that's possible; and there is no chance to find a complex script there.


---------------------------------------------

Mmmmmm.... Just a correction, as I messed up a bit with the description of F<00>013 (save/load menu). I said I couldn't recognize the second half of the file and thought it could be code, but from a comment by halkun I realized I was missing something. I opened a memory card image and found the first 256 unknown bytes into it. (So much for code.  embarassed)
« Last Edit: 2006-06-09 03:49:13 by Tonberry » Report to moderator   Logged
Tonberry
Cool Newbie
*
Posts: 38


View Profile Personal Message (Offline)
« Reply #30 on: 2006-06-11 08:25:03 »
Reply with quote

I think I found assembler code in F<00>013 (load/save game menu), and I mean "valid" assembler code; but it would be great if someone with experience on the psx could tell me if I'm making any mistakes.

I made some quick routines to disassemble the portions of F<00>013 that I couldn't classify and I found something like this at the very begining:

Code:
* ADDIU  $sp, $sp, 65504
  ...
  JR     $ra
  ADDIU  $sp, $sp, 32
* ADDIU  $sp, $sp, 65496
  ...
  JR     $ra
  ADDIU  $sp, $sp, 40
* ADDIU  $sp, $sp, 65512
  ...
  JR     $ra
  ADDIU  $sp, $sp, 24
* ADDIU  $sp, $sp, 65488
  ...
  JR     $ra
  ADDIU  $sp, $sp, 48
* ADDIU  $sp, $sp, 65464
  ...
  JR     $ra
  ADDIU  $sp, $sp, 72
* ADDIU  $sp, $sp, 65472
  ...
  JR     $ra
  ADDIU  $sp, $sp, 64
* ADDIU  $sp, $sp, 65448
...

etc.

Now, if I'm not mistaken, those should be typical entry/exit points for functions, as the instructions marked with an asterisk reserve certain amount of memory on the stack and the one after the "JR $ra" frees the same amount of memory.

I tried with other files from DIR00 and got similar results.
Report to moderator   Logged
Pages: 1 [2] Reply Notify of replies Mark unread Send this topic Print 
Qhimm.com  |  Public forums  |  Tech-related (Moderator: halkun)  |  Topic: ff9.img directories and files « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1 RC3 | SMF © 2001-2006, Lewis Media Valid XHTML 1.0! Valid CSS!
Page created in 0.112 seconds with 23 queries.